package org.springcloud.wisdom.springcloud_03_freshman.student.controller;

import org.springcloud.wisdom.springcloud_03_freshman.common.bean.ResponseData;
import org.springcloud.wisdom.springcloud_03_freshman.common.controller.BaseController;
import org.springcloud.wisdom.springcloud_03_freshman.student.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/dept")
public class DeptController extends BaseController {
    @Autowired
    DeptService deptService;

    /**
     * 获取所有学院
     * @return
     */
    @RequestMapping("/all")
    public ResponseData<Object> getDepts(){
        return returnObject(deptService.getDeptAll());
    }
}
